export function buildUrlParams(url:string, params: Record<string, any>): string {
    const str = Object.keys(params)
      .map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
      .join("&");
    if(str.length === 0) return url;
    return `${url}?${str}`;
  }